# $Id: PKGBUILD 89974 2013-05-06 15:32:45Z schuay $
# Maintainer: schuay <jakob.gruber@gmail.com>
# Contributor: Jonathan Conder <jonno dot conder at gmail dot com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Nathan Jones <nathanj@insightbb.com>
# Contributor: Javier "Phrodo_00" Aravena <phrodo.00 at gmail dot com>
# Contributor: angvp <angvp at archlinux dot us>
# Contributor: Allan <mcrae_allan at hotmail dot com>
# Contributor: w0rm <w0rmtux at gmail dot com>
# Contributor: vEX <vex at niechift dot com>
# Contributor: Asher256 <achrafcherti at gmail dot com>

pkgname=desmume
pkgver=0.9.9
pkgrel=2
pkgdesc="Nintendo DS emulator"
arch=('i686' 'x86_64')
url="http://desmume.org/"
license=('GPL')
depends=('agg' 'gtkglext' 'libglade' 'desktop-file-utils' 'libpcap'
         'soundtouch' 'alsa-lib' 'zziplib' 'glu')
makedepends=('intltool' 'mesa')
install=desmume.install
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # See https://bugs.archlinux.org/task/35086 and
  # https://sourceforge.net/tracker/?func=detail&aid=3612768&group_id=164579&atid=832291
  sed -i 's/@GETTEXT_PACKAGE@/desmume/' po/Makefile.in.in

  ./configure --prefix=/usr --enable-wifi
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
}

md5sums=('458b5f8b3dbb38a47e6d0518f97aa82a')
